package com.xiang.reggie;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/*lombok提供的日志功能
    使用：在类上添加  注解@Slf4j
        在方法内，使用log。info（“reggie项目启动...”）
*/
@Slf4j
@SpringBootApplication
@ServletComponentScan()
@EnableTransactionManagement
//在启动类上加入注解，开启缓存注解功能
@EnableCaching
public class ReggieApplication {

    public static void main(String[] args) {
        String name ="reggie";
        log.info("项目{}项目启动...",name);


        SpringApplication.run(ReggieApplication.class, args);
    }

}
